#ifndef MOBILEFILELIST_H
#define MOBILEFILELIST_H

#include <QWidget>
#include <QListWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QAbstractItemModel>
#include "mobilefilelistitem.h"

class MobileFileList : public QWidget
{
    Q_OBJECT
public:
    explicit MobileFileList(QWidget *parent = nullptr);

    ~MobileFileList();

    enum FILE_LIST_TYPE {PICTURE = 8, VIDEO, MUSIC, DOCUMENT, WECHAT, QQ};

    void setItemCount(const QMap<QString, int> &map);

    void setChangeFontSize(double fontSize);

private Q_SLOTS:
    //图片项点击
    void slotPictureButtonClicked();
    //视频项点击
    void slotVideoButtonClicked();
    //音乐项点击
    void slotMusicButtonClicked();
    //文档项点击
    void slotDocumentButtonClicked();
    //微信项点击
    void slotWeChatButtonClicked();
    // QQ项点击
    void slotQQButtonClicked();
    //手机存储项点击
    void slotMobileButtonClicked();

Q_SIGNALS:
    void sigPictureClicked(int picture);
    void sigVideoClicked(int video);
    void sigMusicClicked(int music);
    void sigDocumentClicked(int document);
    void sigWeChatClicked(int weChat);
    void sigQQClicked(int QQ);
    void sigMobileStorageClicked(QString mobileStorage);

private:
    void initWidget();

    void setItem();

private:
    QListWidget *m_fileListWidget = nullptr;
    QListWidget *m_storageWidget = nullptr;
    QMap<QString, MobileFileListItem *> m_itemMap;
};

#endif // MOBILEFILELIST_H
